/*
 * @Description: 数组去重
 * @Author: zzj
 * @Date: 2021-09-10 12:14:01
 * @LastEditors: zzj
 * @LastEditTime: 2021-09-10 12:15:03
 */

var res =[1,2,5,4,3,6,8,5,4,2,6,7] 
var s = new Set(res);  //Set集合，成员一定不重复，是一个类数组
res = Array.from(s);  //将类数组转回数组类型
console.log(res);